
if event.type == "program" then
    reset = {}
    reset.command = "clear"
    digiline_send("touchscreen", reset)

    buttontest = {}
    buttontest.command = "addbutton"
    buttontest["X"] = 0
    buttontest["Y"] = 0
    buttontest["W"] = 10
    buttontest["H"] = 1
    buttontest["name"] = "button1"
    buttontest["label"] = "Label"
    buttontest.data = 1
    buttontest["data"] = 2
    digiline_send( "touchscreen", buttontest)

    button2 = {}
    button2.command = "addbutton"
    button2["X"] = 0
    button2["Y"] = 1
    button2["W"] = 10
    button2["H"] = 1
    button2["name"] = "button2"
    button2["label"] = "Label2"
    digiline_send( "touchscreen", button2)

    digiline_send("lcd", "default")
end

if event.type == "digiline" and event.channel == "touchscreen" then
    local message = ""
    for i in pairs(event.msg) do
        message = message .. type(i) .. ": " .. i .. "\n"
    end
    digiline_send( "lcd", message) 
end

interrupt(1)
